package com.ztt.vxchat.utils;

import org.springframework.util.ResourceUtils;

import java.io.File;
import java.io.FileNotFoundException;

/**
 * @author ztt
 * @project_name vx-chat
 * @description []
 * @date 2022/8/23 10:38
 */
public class ToolsUtil {


    /**
    * @Author: ztt
    * @param
    * @Description:
    * @Date: 10:39 2022/8/23
    */
    public static String getNowProjectPath(){
        //获取根目录
        /*File path = null;
        try {
            path = new File(ResourceUtils.getURL("classpath:").getPath());
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }

        if(!path.exists()) path = new File("");
        System.out.println("path:"+path.getAbsolutePath());*/

//        System.out.println(System.getProperty("user.dir"));

        return System.getProperty("user.dir");
    }


}
